import type { ID, PageQuery, PageResult } from '#/api/common';

import { requestClient } from '#/api/request';

const baseUrl = '/sys_biz/message';

/** 系统公告列表 */
export function listMessage(params?: PageQuery) {
  return requestClient.get<PageResult>(`${baseUrl}/list`, {
    params,
  });
}

/** 通知列表 */
export function listNotice(params?: PageQuery) {
  return requestClient.get<PageResult>(`${baseUrl}/notice/list`, {
    params,
  });
}

/** 通知已读 */
export function markNoticeRead(noticeId: ID) {
  return requestClient.post(`${baseUrl}/notice/mark_read`, noticeId);
}
